user www-data;

worker_processes 1;
pid /var/run/nginx.pid;

events {
	multi_accept on;
  worker_connections 1024;
}

http {
	gzip on;
	gzip_vary on;
	gzip_comp_level 6;
	gzip_types    text/plain application/x-javascript text/javascript application/octet-stream text/xml text/css application/protobuf application/vnd.android.package-archive application/binary application/zip application/json application/javascript application/x-www-form-urlencoded application/geo+json application/manifest+json application/x-web-app-manifest+json text/cache-manifest text/x-component text/x-cross-domain-policy;

	autoindex on;
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  charset UTF-8;
  source_charset UTF-8;
  charset_types text/plain application/octet-stream text/javascript application/json;
  keepalive_timeout 165;
  types_hash_max_size 2048;
  server_tokens off;
  include /etc/nginx/mime.types;
  default_type application/octet-stream;
  access_log /var/log/nginx/access.log;
  error_log /var/log/nginx/error.log;
  client_max_body_size 900M;
	client_header_buffer_size 100M;
	large_client_header_buffers 8 100M;

	fastcgi_buffer_size 200M;
	fastcgi_buffers 10 200M;

	fastcgi_read_timeout 600;

	set_real_ip_from 204.93.240.0/24;
	set_real_ip_from 204.93.177.0/24;
	set_real_ip_from 199.27.128.0/21;
	set_real_ip_from 173.245.48.0/20;
	set_real_ip_from 103.21.244.0/22;
	set_real_ip_from 103.22.200.0/22;
	set_real_ip_from 103.31.4.0/22;
	set_real_ip_from 141.101.64.0/18;
	set_real_ip_from 108.162.192.0/18;
	set_real_ip_from 190.93.240.0/20;
	set_real_ip_from 188.114.96.0/20;
	set_real_ip_from 197.234.240.0/22;
	set_real_ip_from 198.41.128.0/17;
	real_ip_header     CF-Connecting-IP;

  include /etc/nginx/conf.d/*.conf;
  add_header 'Access-Control-Expose-Headers' 'Content-Lenght,Content-Range';
  add_header Strict-Transport-Security "max-age=999999999; includeSubDomains; preload";
}
